<table class="lb_block" cellpadding="2" cellspacing="1">
	<tr>
		<td class="lb_block_title">{$smarty.const.LANG_BLOCK_SEARCH}</td>
	</tr>
	<tr>
		<td class="lb_block_body">
			<form action="{$lb.webdir}index.php" method="get">
				<input type="hidden" name="do" value="search">
				<br />
				{$smarty.const.LANG_SEARCH_KEY}: <input type="text" name="q" value="{$search_query|default:""}">
				{$smarty.const.LANG_SEARCH_IN}: <select name="search_in">
					<option value="all">
						{$smarty.const.LANG_SEARCH_ALL}
					</option>
					<option value="title"{if $search_in == 'title'} selected{/if}>
						{$smarty.const.LANG_TITLE}
					</option>
				</select>
			{$smarty.const.LANG_CHOOSE_TYPE}: <select name="type">
				{foreach key=name item=item from=$sys_pages}
					<option value="{$name}"{if $name == $search_page_type}selected{/if}>{$name} ({$item.desc})</option>
				{/foreach}
			</select>
				<input type="submit" value="{$smarty.const.LANG_SUBMIT}">
				<br /><br />
			</form>
			{if $search_results[0]}
				<ul>
				<b>{$smarty.const.LANG_SEARCH_RESULT_NUM}:</b> {$search_num|default:"0"}

					<br />
					<b>{$smarty.const.LANG_SEARCH_PAGES}: </b> 
					{section name=href start=1 loop=$search_pages_num+1}
						{if $smarty.section.href.index == $search_page}
							{$smarty.section.href.index}
						{else}
							<a href="{$webdir}index.php?do=search&q={$search_query}&search_in={$search_in}&search_page={$smarty.section.href.index}&type={$search_page_type}">{$smarty.section.href.index}</a>
						{/if}
						&nbsp;
					{/section}
					<br /><br />
					{foreach item=item from=$search_results}
						<li class="lb_searchmenu"><a href="{$webdir}index.php?page={$item.id}">{$item.title}</a></li>
					{/foreach}
					</ul>
					<br /><br />

			{elseif $new_search}
				<ul><b>{$smarty.const.LANG_SEARCH_BOARD}</b></ul>
				<br />
			{else}
				<ul><b>{$smarty.const.LANG_SEARCH_NO_RESULT}</b></ul>
				<br />
			{/if}
		</td>
	</tr>
</table>